//
//  ViewController.h
//  JMXChatKit
//
//  Created by JMX on 2020/6/6.
//  Copyright © 2020 Uniauto. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JMXChatBar.h"
#import "JMXMessageViewCell.h"
#import "JMXMessageTextCell.h"
#import "JMXMessageImageCell.h"
#import "JMXMessageCallCell.h"
#import "JMXMessageFileCell.h"
#import "JMXMessageSecurityCell.h"
#import "JMXMessageTipCell.h"
#import "JMXMessageVideoCell.h"
#import "JMXMessageVoiceCell.h"
#import "JMXMessageLocationCell.h"
#import "JMXMessageQuestionCell.h"
#import "JMXMessageEvaluateCell.h"

@interface JMXChatViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, JMXChatBarDataSource, JMXChatBarDelegate, JMXMessageTextCellDelegate>

@property (nonatomic, strong) JMXChatBar *chatBar;
@property (nonatomic, strong) UITableView *tableView;

@property (nonatomic, strong) NSMutableArray *messageArray;
@property (nonatomic, strong, readonly) NSMutableArray *browseMessages;

@property (nonatomic, assign) BOOL selectable;
@property (nonatomic, strong) NSMutableArray *selectedArray;

- (void)tableViewDidEndDecelerating:(UITableView *)tableView;
- (void)scrollToBottom:(BOOL)animated;

- (void)loadMessages;
- (void)addMessagesToTable:(NSArray *)messages;
- (void)removeMessageFromTable:(id<JMXMessage>)message;
- (void)appendVisibleMessages;

@property (nonatomic, strong) UIActivityIndicatorView *refreshView;
@property (nonatomic, assign) NSInteger pageIndex;
- (void)loadMoreMessages;
- (void)insertMessagesAtTop:(NSArray *)messages;


- (void)addWatermarkWithText:(NSString *)text;

@end

